package cdu.bbs.bbsv2.domain;

import java.util.Objects;

public class Admin {
    private String id;
    private String loginAct;
    private String name;
    private String loginPwd;

    public Admin() {

    }
    public Admin(String id, String loginAct, String name, String loginPwd) {
        this.id = id;
        this.loginAct = loginAct;
        this.name = name;
        this.loginPwd = loginPwd;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLoginAct() {
        return loginAct;
    }

    public void setLoginAct(String loginAct) {
        this.loginAct = loginAct;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }

    @Override
    public String toString() {
        return "Admin{" +
                "id='" + id + '\'' +
                ", loginAct='" + loginAct + '\'' +
                ", name='" + name + '\'' +
                ", loginPwd='" + loginPwd + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof Admin)) {
            return false;
        }
        Admin admin = (Admin) o;
        return Objects.equals(getId(), admin.getId()) && Objects.equals(getLoginAct(), admin.getLoginAct()) && Objects.equals(getName(), admin.getName()) && Objects.equals(getLoginPwd(), admin.getLoginPwd());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getLoginAct(), getName(), getLoginPwd());
    }
}
